- /* slflpw10.cpp by K.Tsuru */
- // function ID = 223 DRADIX
- /********************************************
- SLong class
- It provides a number of power of ten 10^n.
- When n < 0 it returns zero.
- ********************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- SLong Lpow10(long n){
- if(n < 0) return 0.0;
- long q = n/DFIGURES, r = n%DFIGURES;
- long max_sz = (long)SNManager::SNMaxSize(SNManager::DEC_INT);
-
- if(q >= max_sz) SNManager::SetError(SNManager::OVERFLOW_ERR, "LPow10", 223);
-
- fType t = 1u;
- while(r--) t *= 10u;
-
- SLong x(t);
- x.MultPowRdx(q); // x *= R^q version 2.20
-
- // x.SetSign(1); x.figure[(uint)q] = t;
- // x.aHead = x.aTail = (uint)q;
- return x;
- }
slflpw10.cpp : last modifiled at 2017/03/17 11:10:48(709 bytes)
created at 2017/10/07 10:26:49
The creation time of this html file is 2017/11/09 14:52:03 (Thu Nov 09 14:52:03 2017).